<%@ page contentType="text/html" %>
<%@ page pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<%@ include file="header.jsp" %>

		<h3>Users List</h3>
		<br/>
		<table class="dataTable">
			<tr>
				<th width=40%> User		</th>
				<th width=40%> Type 		</th>
				<th width=20%> Actions 	</th>
			</tr>	 
			<c:forEach items="${users}" var="user" varStatus="loopStatus">
			<tr class="${loopStatus.index %2 == 0 ? 'even' :  'odd'}">
				<td class="left"> <c:out value="${user.name}"/> </td>
				<td class="center"> <c:out value="${user.type}"/> </td>
				<td class="center"> 
					<a href="../admin/makeAdmin?id=<c:out value="${user.id}"/>" title="Make Admin">
						<img src="../../resources/admin.png" alt="Make Administrator"/>
					</a>
					<a href="../admin/makeResearcher?id=<c:out value="${user.id}"/>" title="Make Researcher">
						<img src="../../resources/researcher.png" alt="Make Researcher"/>
					</a>
					<a href="../admin/makePlayer?id=<c:out value="${user.id}"/>" title="Make Player">
						<img src="../../resources/gamer.png" alt="Make Player"/>
					</a>
				</td>
			</tr>
			</c:forEach>
		</table>
		
<%@ include file="footer.jsp" %>